package com.kuwei.utils;

import javax.servlet.http.HttpServletRequest;

import com.kuwei.model.User;

public class SessionUtils {

	public static User getUserInfo(HttpServletRequest req){
		return (User) SessionUtils.getSessionObject(req, Constants.LOGIN_KEY);
	}
	
	public static Object getSessionObject(HttpServletRequest req, String sessionKey){
		return req.getSession().getAttribute(sessionKey);
	}
	
	public static void destorySessionObejct(HttpServletRequest req, String sessionKey){
		req.getSession().removeAttribute(sessionKey);
	}
}
